package cn.jiyun.service.impl;import cn.jiyun.entity.XmDistribution;
import cn.jiyun.mapper.XmDistributionMapper;
import cn.jiyun.service.IXmDistributionService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author author
 * @since 2024-11-22
 */
@Service
public class XmDistributionServiceImpl extends ServiceImpl<XmDistributionMapper, XmDistribution> implements IXmDistributionService {

    @Override
    public Page findPage(Integer pageNum, Integer pageSize, XmDistribution xmDistribution) {
        Page<XmDistribution> xmDistributionPage = new Page<>(pageNum,pageSize);
        LambdaQueryWrapper<XmDistribution> qr = new LambdaQueryWrapper<>();
        qr.like(xmDistribution.getApplyy()!=null,XmDistribution::getApplyy,xmDistribution.getApplyy());
        qr.eq(xmDistribution.getStatus()!=null,XmDistribution::getStatus,xmDistribution.getStatus());
        return baseMapper.selectPage(xmDistributionPage,qr);
    }
}
